package receiver.screens;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class SoundboardAdapter extends ArrayAdapter<SoundboardData> {
	private int resourceID;
	private Context context;

	public SoundboardAdapter(Context context, int textViewResourceId) {
		super(context, textViewResourceId);
		this.resourceID = textViewResourceId;
		this.context = context;
	}
	
	public View getView(int position, View convertView, ViewGroup parent) {
		View row = convertView;
		System.out.println("gettting view");
        
        if(row == null)
        {
        	LayoutInflater inf = LayoutInflater.from(context);
            row = inf.inflate(R.layout.soundboard_row, null);

//            LayoutInflater inflater = ( (Activity) context).getLayoutInflater();
//            row = inflater.inflate(resourceID, parent, false);
        }
        TextView t = (TextView) row.findViewById(R.id.soundboard_row_description);
        t.setText("test text");
        
        int x = 3;
        while(x != 0) {}
        
        
        return row;
    }


}
